import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home/index.vue'
import About_me from '../views/About_me/index.vue'
import Album from '../views/Album/index.vue'
import Blog from '../views/Blog/index.vue'
import Message_board from '../views/Message_board/index.vue'
import BlogDetail from '../views/BlogDetail/index.vue'
import Login from '../views/Login/Login.vue'

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'/Login',
  },
  {
    path:'/Login',
    component:Login
  },
  {
    path:'/home',
    component:Home
  },
  {
    path:'/aboutme',
    component:About_me
  },
  {
    path:'/album',
    component:Album
  },
  {
    path:'/blog',
    component:Blog
  },
  {
    path:'/board',
    component:Message_board
  },
  {
    path:'/detail',
    component:BlogDetail
  }
]


const router = new VueRouter({
  routes
})
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (to) {
  return VueRouterPush.call(this, to).catch(err => err)
}
export default router
